//----------------------------------------------------------
    // 日志等级模块
        // 1. 日志等级级别：UNKNOWN,DEBUG,INFO,WARNING,ERROR,FATAL,OFF
        // 2. 将日志等级转换为string
//----------------------------------------------------------

#ifndef __LOG_LEVEL__
#define __LOG_LEVEL__

#include <iostream>
#include <string>

    namespace ymbxlog{
    //日志等级模块
    class LogLevel{
        public:
            enum class Level
            {
                UNKNOWN=0,
                DEBUG, 
                INFO,
                WARNING,
                ERROR,
                FATAL,
                OFF
            };
            static std::string toString(LogLevel::Level lev)
            {
                switch(lev){
                case LogLevel::Level::DEBUG:
                    return "DEBUG";
                    break;
                case LogLevel::Level::INFO:
                    return "INFO";
                    break;
                case LogLevel::Level::WARNING:
                    return "WARNING";
                    break;
                case LogLevel::Level::ERROR:
                    return "ERROR";
                    break;
                case LogLevel::Level::FATAL:
                    return "FATAL";
                    break;
                case LogLevel::Level::OFF:
                    return "OFF";
                    break;
                }
                return "UNKNOWN";
            }
    };
};

#endif